Completed
Push — master ( 3ce364...b1ab6e )
by Andres
58s
created

reaction-table.js ➔ ... ➔ ct.visibleSyntheses   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
nc 1
dl 0
loc 3
rs 10
nop 1
1
/**
2
 reactionTable
3
 Component for the table of reactions in the Reactor tab.
4
5
 @namespace Components
6
 */
7
'use strict';
8
9
angular.module('game').component('reactionTable', {
10
  templateUrl: 'views/reactionTable.html',
11
  controller: ['$scope', 'util', 'format', 'visibility', 'data', 'state', reactionTable],
12
  controllerAs: 'ct',
13
  bindings: {
14
    reactor: '<',
15
    element: '<',
16
    title: '<'
17
  }
18
});
19
20
function reactionTable($scope, util, format, visibility, data, state) {
21
  let ct = this;
22
  ct.util = util;
23
  ct.format = format;
24
  ct.data = data;
25
  ct.state = state;
26
27
  $scope.$watch('ct.element', function() {
28
      ct.reactionSelect = ct.reactor.availableReactions(ct.element)[0];
29
  });
30
}
31